	var ChatBox = new Array();
	var ChatBoxReady = false;
	var ChatBoxTextBGColor = new Array();
	var ChatBoxTextBGColor_LastState = 0;
	//var ChatBoxTextBGColor[0] = '#FFFFFF';
	//var ChatBoxTextBGColor[1] = '#BBBBBB';
	var MessageSize = 0;
	
// ################### general Functions... 
	
	function AppendMessage(text) {
			if (ChatBoxTextBGColor_LastState == 0) {
				ChatBoxTextBGColor_LastState = 1;
			} else {
				ChatBoxTextBGColor_LastState = 0;
			};
			
			// Append Chat Message to Div (make a new div in div.. ) .. lots of babies.. 
			var div = document.getElementById('ChatBox');
			var newcontent = document.createElement('div');
			newcontent.innerHTML = text;
			div.appendChild(newcontent);
			
			//Scroll down (on each Append) so we see the latest Messages..
			$('#ChatBox').stop().animate({scrollTop: $("#ChatBox")[0].scrollHeight}, 800);
			document.getElementById('text').value = "";
		};
		
	function SendChatMessage() { // Checks input.. and triggers it.
			var ChatMessage = document.getElementById('text').value; //fetch data from Textbox
			if (ChatBoxReady == false) {
				AppendMessage('ChatBox not ready, please wait...');
			} else {
				if (ChatMessage.length > 1) {
					//TODO: Char.Counter (msgsize)
					socket.emit('chatmessage', ChatMessage); //emit ChatMessage
					//AppendMessage(ChatMessage); //write it to own ChatBox
				}
				
			}
		};
		
	function SendManualMessage(command, message) { 
			var ChatMessage = command + message; //fetch data from Textbox
			if (ChatBoxReady == false) {
				AppendMessage('ChatBox not ready, please wait...');
			} else {
				if (ChatMessage.length > 1) {
					//TODO: Char.Counter (msgsize)
					socket.emit('chatmessage', ChatMessage); //emit ChatMessage
				}
				
			}
		};
		
	function RefreshUserList(data) {
		
	};
		
// ###### socket.io stuff

	